package com.xqh.service.impl.ques;

import com.xqh.base.dao.CrudMapper;
import com.xqh.base.service.impl.BaseCrudServiceImpl;
import com.xqh.dao.ques.ImportRecordMapper;
import com.xqh.entity.ques.ImportRecord;
import com.xqh.service.ques.ImportRecordService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * @author leo
 * @date 2018-04-25 16:15:14
 * @version 1.0.0
 * @copyright www.vip-young.com
 */
@Service("importRecordService")
public class ImportRecordServiceImpl extends BaseCrudServiceImpl<ImportRecord> implements ImportRecordService {

    @Resource
    private ImportRecordMapper importRecordMapper;

    @Override
    public CrudMapper init() {
        return importRecordMapper;
    }

    @Override
    public ImportRecord getByCode(String code) {
        Map<String,Object> map = new HashMap<>();
        map.put("code", code);
        ImportRecord re = this.findOneByBiz(map);
        return re;
    }
}